import request from '../utils/request';
import { createAuthorizationRefreshTokenHeader } from '../utils/auth';

export async function login(params) {
    return request('/api/auth/login', {
        method: 'POST',
        body: JSON.stringify(params)
    });
}

export async function token() {
    return request('/api/auth/token', {
        headers: createAuthorizationRefreshTokenHeader()
    });
}